from common.Utils import SearchDriver

from selenium.webdriver.common.by import By


class Search:
    url = ""
    driver = ""

    def __init__(self):
        self.url = "http://43.143.124.62:8081"
        self.driver = SearchDriver.driver
        self.driver.get(self.url)

    def SearchTest(self):
        self.driver.find_element(By.CSS_SELECTOR, "#body > div > div.search > input[type=text]").clear()
        self.driver.find_element(By.CSS_SELECTOR, "#body > div > div.search > input[type=text]").send_keys("filesystem")
        self.driver.find_element(By.CSS_SELECTOR, "body > div > div.search > button").click()
        SearchDriver.getScressShot()


search = Search()
search.SearchTest()
